stylecontext: Remove _list_classes() from public API
authorTimm Bäder <mail@baedert.org>
Sat, 25 Apr 2020 14:42:30 +0000 (16:42 +0200)
committerTimm Bäder <mail@baedert.org>
Tue, 5 May 2020 06:20:09 +0000 (08:20 +0200)
Applications can use gtk_widget_get_css_classes these days.

docs/reference/gtk/gtk4-sections.txt
gtk/gtkstylecontext.c
gtk/gtkstylecontext.h

index e0c375cc404cddb175f6c4b6b4c1818d6cbdf21a..361f48b28f7f9ac02e4b4dfb6e65b92b0aae6049 100644 (file)
@@ -4472,7 +4472,6 @@ gtk_style_context_save
 gtk_style_context_add_class
 gtk_style_context_remove_class
 gtk_style_context_has_class
-gtk_style_context_list_classes
 gtk_style_context_set_display
 gtk_style_context_set_state
 gtk_style_context_set_scale
index d04741cd3683b3403e7986e5c6ad4ffecfb674fd..8463b93c0f41f96ea631fd66bd1dba3a468be443 100644 (file)
@@ -781,34 +781,6 @@ gtk_style_context_has_class (GtkStyleContext *context,
   return gtk_css_node_has_class (priv->cssnode, class_quark);
 }
 
-/**
- * gtk_style_context_list_classes:
- * @context: a #GtkStyleContext
- *
- * Returns the list of classes currently defined in @context.
- *
- * Returns: (transfer container) (element-type utf8): a #GList of
- *          strings with the currently defined classes. The contents
- *          of the list are owned by GTK+, but you must free the list
- *          itself with g_list_free() when you are done with it.
- **/
-GList *
-gtk_style_context_list_classes (GtkStyleContext *context)
-{
-  GtkStyleContextPrivate *priv = gtk_style_context_get_instance_private (context);
-  GList *classes_list = NULL;
-  const GQuark *classes;
-  guint n_classes, i;
-
-  g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL);
-
-  classes = gtk_css_node_list_classes (priv->cssnode, &n_classes);
-  for (i = n_classes; i > 0; i--)
-    classes_list = g_list_prepend (classes_list, (gchar *)g_quark_to_string (classes[i - 1]));
-
-  return classes_list;
-}
-
 GtkCssValue *
 _gtk_style_context_peek_property (GtkStyleContext *context,
                                   guint            property_id)
index 6a310b5c3fae7a1e0e733db09518fa1444f55deb..e6e7fcd81df6b63d778e632e4be5b3c6df5df605 100644 (file)
@@ -865,9 +865,6 @@ void          gtk_style_context_set_scale    (GtkStyleContext *context,
 GDK_AVAILABLE_IN_ALL
 gint          gtk_style_context_get_scale    (GtkStyleContext *context);
 
-GDK_AVAILABLE_IN_ALL
-GList *  gtk_style_context_list_classes (GtkStyleContext *context);
-
 GDK_AVAILABLE_IN_ALL
 void     gtk_style_context_add_class    (GtkStyleContext *context,
                                          const gchar     *class_name);